package com.education.wisdom.service.impl;

import com.education.wisdom.mapper.RulesMapper;
import com.education.wisdom.pojo.Rules;
import com.education.wisdom.service.RulesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 *  服务层实现
 *
 * @author d
 * @date 2020-09-16 15:23:01
 */
@Service
public class RulesServiceImpl implements RulesService {

    @Autowired
    private RulesMapper rulesMapper;

    //查询信息
    @Override
    public Rules selectRulesById(Integer id) {
        return rulesMapper.selectRulesById(id);
    }

    // 查询列表
    @Override
    public List<Rules> selectRulesList(Rules rules) {
        return rulesMapper.selectRulesList(rules);
    }

    // 新增
    @Override
    public int insertRules(Rules rules) {
        return rulesMapper.insertRules(rules);
    }

    //修改
    @Override
    public int updateRules(Rules rules) {
        return rulesMapper.updateRules(rules);
    }

    //删除对象
    @Override
    public int deleteRulesByIds(String ids) {
        return rulesMapper.deleteRulesByIds(ids.split(","));
    }
}